home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part2 / 12359 < prev    next >
Encoding:
Text File  |  1996-08-05  |  659 b   |  36 lines

  1. Path: news.mindspring.com!usenet
  2. From: rudd@mindspring.com (Justin Rudd)
  3. Newsgroups: comp.lang.c++
  4. Subject: Re: Help! Newbie question ...
  5. Date: Tue, 19 Mar 1996 17:36:58 GMT
  6. Organization: MindSpring Enterprises
  7. Message-ID: <4imrip$8gi@firebrick.mindspring.com>
  8. References: <4ilkfu$41q@Kaos.deepcove.com>
  9. Reply-To: rudd@mindspring.com
  10. NNTP-Posting-Host: rudd.mindspring.com
  11. X-Newsreader: Forte Free Agent v0.55
  12.  
  13. saffleck@deepcove.com (Sean Affleck) wrote:
  14.  
  15. >Is this legal ? 
  16.  
  17. >class A {...};
  18.  
  19. >A f();
  20.  
  21. >main() {
  22. >  A a = f();
  23. >}
  24.  
  25. >A f()
  26. >{
  27. >   A fa;
  28. >   return fa;
  29. >}
  30.  
  31. Sure is....just make sure you have a copy constructor and an
  32. assignment operator.
  33.  
  34. Justin
  35.  
  36.